import { Entity, Column, PrimaryGeneratedColumn, UpdateDateColumn, ManyToOne, JoinColumn } from 'typeorm';
import { AdPosition } from "./ad_position.entities";
import { ApiProperty} from '@nestjs/swagger';
import { IsOptional } from 'class-validator';

@Entity()
export class SearchHistory {
  @PrimaryGeneratedColumn({type: 'int'})
  msg_id: number;

  @IsOptional()
  @ApiProperty()
  @Column({type: 'char', length: 50 })
  keyword:string;

  @IsOptional()
  @ApiProperty()
  @Column({type: 'varchar' ,length: 45 })
  from: string;

  @IsOptional()
  @ApiProperty()
  @Column({type:"int"})
  add_time: number;

  @IsOptional()
  @ApiProperty()
  @Column({type:"int"})
  user_id: number;
}
